<template>
    <el-menu :default-active="route.path" class="el-menu-vertical-demo" router>
        <el-menu-item index="/home/IndexView">
            <el-icon><House /></el-icon>
            <span>首页</span>
        </el-menu-item>

        <el-sub-menu index="/service">
            <template #title>
                <el-icon><Service /></el-icon>
                <span>服务管理</span>
            </template>
            <el-menu-item index="/home/ServiceTypeView">服务类型管理</el-menu-item>
            <el-menu-item index="/home/ServiceOrderView">服务订单管理</el-menu-item>
        </el-sub-menu>

        <el-sub-menu index="/activity">
            <template #title>
                <el-icon><Calendar /></el-icon>
                <span>活动管理</span>
            </template>
            <el-menu-item index="/home/ActivityMenageView">活动管理</el-menu-item>
            <el-menu-item index="/home/ActivityTypeView">活动类型管理</el-menu-item>
        </el-sub-menu>

        <el-sub-menu index="/dining">
            <template #title>
                <el-icon><Bowl /></el-icon>
                <span>餐饮服务管理</span>
            </template>
            <el-menu-item index="/home/MenuManage">菜谱管理</el-menu-item>
            <el-menu-item index="/home/DiningFeedbackManage">需求管理</el-menu-item>
            <el-menu-item index="/home/DiningFeedbackAdminView">需求回复</el-menu-item>
        </el-sub-menu>

        <el-sub-menu index="/health">
            <template #title>
                <el-icon><FirstAidKit /></el-icon>
                <span>健康管理</span>
            </template>
            <el-menu-item index="/home/HealthOrderView">健康订单管理</el-menu-item>
            <el-menu-item index="/home/HealthMenageView">健康报告管理</el-menu-item>
        </el-sub-menu>

        <el-sub-menu index="/user">
            <template #title>
                <el-icon><User /></el-icon>
                <span>人员管理</span>
            </template>
            <el-menu-item index="/home/UserMenageView">普通用户管理</el-menu-item>
            <el-menu-item index="/home/userAudit">用户审核</el-menu-item>
            <el-menu-item index="/home/WorkerMenageView">工作人员管理</el-menu-item>
            <el-menu-item index="/home/DoctorMenageView">医护人员管理</el-menu-item>
        </el-sub-menu>

        <el-sub-menu index="/news">
            <template #title>
                <el-icon><Document /></el-icon>
                <span>新闻管理</span>
            </template>
            <el-menu-item index="/home/NewsManageView">新闻文章管理</el-menu-item>
            <el-menu-item index="/home/NewsCategoryView">新闻分类管理</el-menu-item>
        </el-sub-menu>
    </el-menu>
</template>

<script setup>
import { useRoute } from 'vue-router'
import {
    House,
    Calendar,
    Service,
    Bowl,
    FirstAidKit,
    User,
    Document
} from '@element-plus/icons-vue'

const route = useRoute()
</script>

<style scoped>
.el-menu-vertical-demo:not(.el-menu--collapse) {
    width: 200px;
    min-height: 400px;
}
</style> 